<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath() + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=path%>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>众筹管理后台</title>
<link rel="stylesheet" href="admin/css/bootstrap.min.css" />
<link rel="stylesheet" href="admin/css/dashboard.css" />
</head>
<body>

	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container-fluid">
			<%@include file="/WEB-INF/admin/import/header.jsp"%>
		</div>
	</nav>

	<div class="container-fluid">
		<div class="row">
			<%@include file="/WEB-INF/admin/import/tisch.jsp"%>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
				<h1 class="page-header">所有众筹项目</h1>

				<div class="panel panel-default">
					<div class="panel-body">
						<form class="form-inline">
							<div class="form-group">
								<input type="text" class="form-control" id="exampleInputName2"
									placeholder="项目名称">
							</div>
							<div class="form-group">
								<input type="text" class="form-control" id="exampleInputName2"
									placeholder="项目发起人">
							</div>
							<div class="form-group">
								<select class=form-control>
									<option>项目状态</option>
									<option>众筹中</option>
									<option>众筹失败</option>
									<option>众筹成功</option>
								</select>
							</div>
							<div class="form-group">
								<select class=form-control>
									<option>项目类型</option>
									<option>教育助学</option>
									<option>爱心环保</option>
									<option>扶贫助困</option>
									<option>公益创业</option>
									<option>公益活动</option>
								</select>
							</div>
							&nbsp;&nbsp;
							<button type="submit" class="btn btn-default btn-primary">查询</button>
						</form>
					</div>
				</div>
				<div class="panel panel-default">
					<div class="panel-heading">
						<div class="panel-title">所有项目列表</div>
					</div>
					<div class="panel-body">

						<div class="table-responsive ">
							<table class="table table-striped table-bordered">
								<thead>
									<tr>
										<th>序号</th>
										<th>项目类型</th>
										<th>项目名称</th>
										<th>项目进度</th>
										<th>开始日期</th>
										<th>结束日期</th>
										<th>已筹金额</th>
										<th>发起人</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${allproduct }" var="p" varStatus="status">

										<tr>
											<%--    <td>${stats.conet }</td> --%>
											<td>${status.count }</td>
											<td>${p.type }</td>
											<td>${p.title }</td>
											<td><fmt:formatNumber type="percent"
													value="${p.getMoney/p.money }" /></td>
											<td><fmt:formatDate value="${p.time }"
													pattern="yyyy/MM/dd" /></td>
											<td><fmt:formatDate value="${p.endTime }"
													pattern="yyyy/MM/dd" /></td>
											<td>${p.getMoney }</td>
											<td>${p.user.realname }</td>
											<td><a href="admin/alldetail?id=${p.id }">详情</a></td>
										</tr>
									</c:forEach>


								</tbody>
							</table>
						</div>

						<nav aria-label="Page navigation" class="text-right">
							<ul class="pagination">
								<li class="disabled"><a href="#" aria-label="Previous">
										<span aria-hidden="true">&laquo;</span>
								</a></li>
								<li class="active"><a href="#">1</a></li>
								<li><a href="#">2</a></li>
								<li><a href="#">3</a></li>
								<li><a href="#">4</a></li>
								<li><a href="#">5</a></li>
								<li><a href="#" aria-label="Next"> <span
										aria-hidden="true">&raquo;</span>
								</a></li>
							</ul>
						</nav>
					</div>


				</div>

			</div>
		</div>
	</div>

	<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
	<script type="text/javascript" src="admin/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="admin/js/countUp.js"></script>
	<script>
			$(document).ready(function() {
				
			});
		</script>

	<script type="text/javascript">
			function getmoney(){
				var getmoney = ${p.getMoney };
				var money = ${p.money };
				var m =getmoney/money;
				${"#td"}.val(m);
			}
		</script>

</body>
</html>
